//
//  ViewController.m
//  词典
//
//  Created by Justsoso on 16/4/13.
//  Copyright © 2016年 Justsoso. All rights reserved.
//

#import "ViewController.h"

#import "SQLiteManager.h"

@interface ViewController ()
@property (weak, nonatomic) IBOutlet UITextField *wordTextField;
@property (weak, nonatomic) IBOutlet UITextView *infoTextField;

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
}
- (IBAction)btnPressed:(id)sender
{
    SQLiteManager *manager = [SQLiteManager shareSQLiteManager];
    [manager openDB:@"myDict.db"];
}

- (IBAction)query:(id)sender
{
    SQLiteManager *manager = [SQLiteManager shareSQLiteManager];
    self.infoTextField.text = [manager findWord:self.wordTextField.text];
}

@end
